:root {}

.use-template-mzh {
    border: dashed 1px red;
    padding: 16px 24px;
    background-color:ivory;
}

/* 收缩标题 */
.use-template-mzh h1 {
    counter-reset: mzh-header1;
    text-decoration: underline;
    text-underline-offset: 5px;
    font-weight: 700;
    line-height: 28px;
    font-size: 24px;
    zoom: 1;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    margin-left: 12px;
}

.use-template-mzh h2 {
    counter-reset: mzh-header2;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    margin-left: 18px;
}

.use-template-mzh h3 {
    counter-reset: mzh-header3;
    font-size: 20px;
    font-weight: 500;
    font-family: cursive;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    margin-left: 24px;
}

.use-template-mzh h1:hover, .use-template-mzh h2:hover, .use-template-mzh h3:hover {
    color: rgb(76, 165, 201);
}

.use-template-mzh h1::before {
    content: counter(mzh-header1)"、";
    counter-increment: mzh-header1;
}

.use-template-mzh h2::before {
    content: counter(mzh-header1)"."counter(mzh-header2);
    counter-increment: mzh-header2;
    padding-right: 24px;
}

.use-template-mzh h3::before {
    content: counter(mzh-header1)"."counter(mzh-header2)"."counter(mzh-header3);
    counter-increment: mzh-header3;
    padding-right: 24px;
}

.use-template-mzh h1::after, .use-template-mzh h2::after, .use-template-mzh h3::after {
    content: "";
    display: block;
    position: absolute;
    left: -1em;
    top: 0.5em;
    height: 0;
    width: 0;
    border: solid .3em transparent;
    border-top: currentColor .3em solid;
    transform-origin: 50% 0%;
    transition: 0.1s all;
}

.use-template-mzh h1.active::after, .use-template-mzh h2.active::after, .use-template-mzh h3.active::after {
    transform: rotate(-90deg);
}

.use-template-mzh h1+*, .use-template-mzh h2+*, .use-template-mzh h3+* {
    max-height: 9999px;
}

.use-template-mzh h1+* {
    margin-left: 6px;
}

.use-template-mzh h2+* {
    margin-left: 12px;
}

.use-template-mzh h3+* {
    margin-left: 18px;
}

.use-template-mzh h1.active+*, .use-template-mzh h2.active+*, .use-template-mzh h3.active+* {
    overflow: hidden;
    max-height: 0;
}

.use-template-mzh h4 {
    counter-reset: mzh-header4;
    line-height: 24px;
    text-decoration: underline wavy red 1px;
    text-underline-offset: 3px;
}